package com.atguigu.scala.chapter7

import scala.collection.immutable.Queue

/**
 * @author lizikuan
 * @date 2021/5/25 11:37
 */
object $10_Queue {
  def main(args: Array[String]): Unit = {
    val queue = Queue(1, 2, 3, 4)
    queue.reduceRight((agg,cur)=>{
      println(agg,cur)
      agg+cur
    })
  }
}
